window.onload=function()
{
	var logg=document.getElementById("log");
	var regg=document.getElementById("reg");
	var div=document.getElementById("ln");
	if(localStorage.getItem("name")!==null)
	{
		logg.parentNode.removeChild(logg);
		var user=document.createElement("font");
		user.innerText="欢迎你:"+localStorage.getItem("name")+"!   ";
		div.appendChild(user);
		div.appendChild(regg);
		
	}
	var showtime = document.getElementById("showtime");  
	setInterval(function() {   
	var time = new Date();   // 程序计时的月从0开始取值后+1   
	var m = time.getMonth() + 1;   
	var t = time.getFullYear() + "-" + m + "-"     
	+ time.getDate() + " " + time.getHours() + ":"     
	+ time.getMinutes() + ":" + time.getSeconds();   
	showtime.innerHTML = t;  
	}, 1000); 
	
}
var i=0;
function lunbo()
{	i++;
	var mg=document.getElementById("lunbo");
	if(i<=7)
	mg.src="img/pb"+i+".jpg";
	else
	{
		i=1;
		mg.src="img/pb"+i+".jpg";
	}
}
setInterval("lunbo()",2000);
